#ifndef PRINCIPAL_WINDOW_H
#define PRINCIPAL_WINDOW_H

#include <QMainWindow>
#include <QScrollArea>
#include <QSpinBox>
#include <QLabel>


#define MAX_RECENT_PROJECTS 5

namespace Ui {
    class Principal_window;
}

class Principal_window : public QMainWindow
{
    Q_OBJECT

public:
    explicit Principal_window(QWidget *parent = 0);
    ~Principal_window();
    void add_central_widget(QWidget *widget);
    int get_factor();
    bool get_paused();
    void disable_simulator_actions();
    void enable_simulator_actions();
    void set_real_time(double time);
    void set_sim_step(int step);
    void enable_view_actions();
    void enable_graphic_allc();
    void retranslateUi();

signals:
    void s_new_project();
    void s_open_project(const QString &project);
    void s_close(QCloseEvent *ev);
    void s_rrotate();
    void s_lrotate();
    void s_urotate();
    void s_drotate();
    void s_rmove();
    void s_lmove();
    void s_umove();
    void s_dmove();
    void s_zin();
    void s_zout();
    void s_reset_camera();
    void s_graphicGeometry();
    void s_graphicAllConfigurations();
    void s_settings();
    void s_play_pause();
    void s_rewind();
    void s_uavtex();
    void s_simtex();
    void s_perspective();
    void s_ortho();
    void s_english();
    void s_spanish();

private slots:
    void new_project();
    void open_project();
    void settings();
    void about();
    void play_pressed();
    void perspective();
    void ortho();
    void spanish_selected();
    void english_selected();
//    void open_recents_projects();
//    void update_status_bar();

private:
    void initialize_labels();
    void create_actions();
    void create_menus();
    void create_toolbars();
    void closeEvent(QCloseEvent *);

private:
    Ui::Principal_window *ui;
    QStringList recent_projects;
    QAction *recent_project_actions[MAX_RECENT_PROJECTS];
    QAction *exit_action;
    QToolBar *project_toolbar;
    QScrollArea scrollArea;

    QSpinBox *factor_spinbox;
    QLabel *factor_label;
    QLabel *real_time;
    QLabel *sim_step;
    bool paused;
};

#endif // PRINCIPAL_WINDOW_H
